.App {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.actions {
  text-align: right;
  margin-bottom: 20px;
}

.clear-btn {
  background-color: #dc3545;
}

.clear-btn:hover {
  background-color: #c82333;
}

.section {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.section h2 {
  color: #333;
  margin-top: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #0056b3;
}

.layout {
  min-height: 100vh;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: #001529;
}

.logo {
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.sidebar {
  background: #f0f2f5;
  padding: 16px 0;
  min-height: calc(100vh - 128px);
}

.content {
  padding: 24px;
  background: #f0f2f5;
  min-height: calc(100vh - 128px);
}

.page-container {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.footer {
  text-align: center;
  background: #f0f2f5;
  padding: 16px 0;
}

.results {
  margin-top: 24px;
}

.transaction-card {
  margin-bottom: 12px;
}

.summary-card {
  margin-top: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }
  
  .content {
    padding: 12px;
  }
  
  .page-container {
    padding: 16px;
  }
  
  .sidebar {
    min-height: auto;
    padding: 8px 0;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

table, th, td {
  border: 1px solid #ddd;
}

th, td {
  padding: 12px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
}

.profit-positive {
  color: #28a745;
  font-weight: bold;
}

.profit-negative {
  color: #dc3545;
  font-weight: bold;
}

.transaction-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.transaction-item input {
  flex: 1;
}

.transaction-item button {
  flex: 0 0 auto;
  background-color: #dc3545;
}

.transaction-item button:hover {
  background-color: #c82333;
}

.summary {
  margin-top: 20px;
  padding: 15px;
  background-color: #e9ecef;
  border-radius: 4px;
}

.summary h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

.summary p {
  margin: 5px 0;
  font-weight: bold;
}

@media (max-width: 768px) {
  .transaction-item {
    flex-direction: column;
    align-items: stretch;
  }
  
  .transaction-item button {
    align-self: flex-start;
  }
}